package com.jiyun.h2303b.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiyun.h2303b.dao.BrandMapper;
import com.jiyun.h2303b.pojo.TbBrand;
import com.jiyun.h2303b.service.BrandService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, TbBrand> implements BrandService {
    @Transactional
    @Override
    public void changeBrand() {
        this.baseMapper.deleteById(4);
        TbBrand tbBrand = new TbBrand();
        tbBrand.setName("苹果");
        this.baseMapper.insert(tbBrand);
    }
}
